package com.moke.util.base
{
	public class ObjectUtil
	{
		/** 打印输出数组对象 */
		static public function toString(oArray:Object, nLevel:uint=0):String
		{
			var sIndent:String="";
			for (var i:Number=0; i < nLevel; i++)
			{
				sIndent+="\t";
			}
			
			var sOutput:String="";
			for (var sItem:String in oArray)
			{
				if (oArray[sItem] is Object)
				{
					sOutput = sIndent + "** " + sItem + " **\n" + toString(oArray[sItem], nLevel + 1) + sOutput;
				}
				else
				{
					sOutput += sIndent + sItem + ":" + oArray[sItem] + "\n";
				}
			}
			return sOutput;
		}
	}
}